package com.jaws.demo.feign;

import com.jaws.core.common.page.Page;
import com.jaws.core.common.vo.OpRequest;
import com.jaws.core.common.vo.OpResponse;
import com.yyfax.vaccount.vo.AccountInitReq;
import com.yyfax.vaccount.vo.AccountInitRsp;
import com.yyfax.vaccount.vo.QueryAccountLogReq;
import com.yyfax.vaccount.vo.QueryAccountLogRsp;
import com.yyfax.vaccount.vo.QueryAccountRsp;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;

@Component
@FeignClient(value = "yyfax-vaccount")
public interface VAccountFeign {


	@RequestMapping(method = RequestMethod.POST, path = "/api/vaccount/init")
	OpResponse<AccountInitRsp> initAccount(@RequestBody @Valid AccountInitReq req);

	@RequestMapping(method = RequestMethod.POST, path = "/api/vaccount/test111")
	OpResponse<QueryAccountRsp> test();


	@PostMapping("/api/vaccount/query/account_log")
	OpResponse<Page<QueryAccountLogRsp>> queryAccountLog(@RequestBody @Valid QueryAccountLogReq req);

}
